package com.jxw.test.application.service.handler;

import com.jxw.test.application.base.strategy.StrategyType;
import com.jxw.test.application.base.strategy.annotation.Strategy;
import com.jxw.test.application.base.strategy.handler.BaseStrategyHandler;
import com.jxw.test.application.domain.entity.DeviceBind;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * 设备绑定处理器
 */
@Component
@Slf4j
@Strategy(type = StrategyType.DEVICE_BIND)
public class DeviceBindStrategyHandler extends BaseStrategyHandler<DeviceBind, Integer> {

    /**
     * 核心业务方法 - 设备绑定
     *
     * @param deviceBind
     */
    @Override
    public Integer doHandler(DeviceBind deviceBind) {
        log.info("【设备绑定】【默认】绑定方法：{}", deviceBind);
        return 1;
    }

    /**
     * 业务成功处理方法
     *
     * @param deviceBind
     * @param result
     */
    @Override
    public Integer succHandler(DeviceBind deviceBind, Integer result) {
        log.info("【设备绑定】【默认】成功处理方法：{} 发送短信!!!", deviceBind);
        return result;
    }


}
